package com.qch.concurrent.demo_05_interrupt;

/**
 * @Author qch
 * @Date 2021/7/29
 */
public class Main3 {
    public static void main(String[] args) throws InterruptedException {
        MyThread3 myThread3 = new MyThread3();
        myThread3.start();
        Thread.sleep(10);
        //中断线程（线程睡觉，等待，join的时候调用这个方法）
        myThread3.interrupt();
        Thread.sleep(7);
        System.out.println("main中断状态检查-1："+myThread3.isInterrupted());
        System.out.println("main中断状态检查-2："+myThread3.isInterrupted());

    }
}
